#ifndef TASK_CYCLE_H
#define TASK_CYCLE_H
#include "main.h"

/**
 * 任务优先级数值越小，任务优先级越高
 */


typedef struct 
{
    uint8_t task_1ms:1;
    uint8_t task_5ms:1;
    uint8_t task_10ms:1;
    uint8_t task_20ms:1;
    uint8_t task_50ms:1;
    uint8_t task_100ms:1;
    uint8_t task_500ms:1;
}os_task_t;

extern os_task_t ut_os_task_config;
#define TASK_PRIO_1ms     (tskIDLE_PRIORITY + 1)
void Task_1ms_init(void);

#define TASK_PRIO_5ms     (tskIDLE_PRIORITY + 2)
void Task_5ms_init(void);

#define TASK_PRIO_10ms      (tskIDLE_PRIORITY + 3)
void Task_10ms_init(void);


#define TASK_PRIO_MBTCP_SLAVE   (tskIDLE_PRIORITY + 4)
#define TASK_PRIO_MB485_MASTER  (tskIDLE_PRIORITY + 8)

#define TASK_PRIO_20ms      (tskIDLE_PRIORITY + 5)
void Task_20ms_init(void);

#define TASK_PRIO_50ms      (tskIDLE_PRIORITY + 6)
void Task_50ms_init(void);

#define TASK_PRIO_100ms     (tskIDLE_PRIORITY + 7)
void Task_100ms_init(void);

#define TASK_PRIO_500ms     (tskIDLE_PRIORITY + 20)
void Task_500ms_init(void);


void mb_tcp_reg_init(void);
/**
 * @brief 任务配置初始化，需要根据实际情况使能和禁止任务
 */
void task_config_init(void);
#endif

